<?php $id = $this->item->getSource() . "_" . $this->item->getID(); ?>

<div class='item_wrapper' id='item_wrapper_<?= $id ?>'>
	
	<div class="hentry h-entry entry <?php if($this->item->isHidden()) : ?> hidden <?php else : ?> item <?php endif ?>" id='item_<?= $id ?>'>
		<div class='item_left'>
			<a href="<?= $this->base()->thisUrl()?>/entry/<?= $this->item->getSlug() ?>" class="u-url" rel="bookmark">
				<img class="icon" src="<?= $this->item->getIcon();?>" width='16' height='16' />
			</a>
			<abbr class="published dt-published" title="<?= date("c", $this->item->getTimestamp()); ?>">
			<span id='item_time_<?= $id ?>' class='time' <?php if ($this->admin): ?> onclick='onEditDate(<?= $this->item->getSource() ?>, <?= $this->item->getID() ?>, <?= $this->item->getTimestamp() ?>);'<?php endif ?>>
				<?= date("H:i", $this->item->getTimestamp()); ?>
			</span>
			</abbr>
			<div class="waiter" id='item_wait_<?= $id ?>' style='display:none'></div>
			<?php if ($this->disqus) : ?>
				<div class='disqus'>
					<a href="<?= $this->base()->thisUrl()?>/entry/<?= $this->item->getSlug() ?>#disqus_thread">?</a>	
				</div>
			<?php endif ?>
		</div>
		<div class='item_right'>
			<div class='item_content'>
				
				<div class='item_actions'>
	
					<?php if($this->admin) : ?>
						<?php if($this->item->getPrefix() == 'stuffpress') : ?>
							<a href='javascript:delete_item(<?= $this->item->getSource() ?>, <?= $this->item->getID() ?>);' title="Delete"><img src="images/01.png" /></a>
						<?php endif ?>
						<a href="admin/post/edit/source/<?= $this->item->getSource() ?>/item/<?= $this->item->getID() ?>" title="Edit"><img src="images/18.png" /></a>
						<a id="toggle_show_item_a_<?= $id ?>" href='javascript:toggle_show_item(<?= $this->item->getSource() ?>, <?= $this->item->getID() ?>);' title="<?php if($this->item->isHidden()) echo "Make public"; else echo "Make private"; ?>"><img id="toggle_show_item_img_<?= $id ?>" src="images/<?php if($this->item->isHidden()) echo "lock_open"; else echo "lock"; ?>.gif" /></a>
					<?php endif ?>
						
					<?php if ($this->googlefc) : ?>
					<a class="comment" href='javascript:location.href="<?= $this->base()->thisUrl()?>/entry/<?= $this->item->getSlug() ?>";' class="item_add_comment" title="Add comment"><img src="images/28.png" /></a>
					<?php elseif ($this->disqus) : ?>
					
					<?php else : ?>
					<action do="reply" with="<?= $this->base()->thisUrl()?>/entry/<?= $this->item->getSlug() ?>">
					  <a class="comment" href='javascript:toggle_add_comment(<?= $this->item->getSource() ?>, <?= $this->item->getID() ?>);' class="item_add_comment" title="Add comment"><img src="images/28.png" /></a>
					</action>
					<?php endif ?>
					
                                        <!-- AddThis Button BEGIN -->
                                       <action do="post" with="<?= $this->base()->thisUrl()?>/entry/<?= $this->item->getSlug() ?>"> 
					<a class="addthis" href="javascript:onAddthisClick('<?= $this->base()->thisUrl()?>/entry/<?= $this->item->getSlug() ?>', '<?= $this->escape(str_replace("'", "\"", $this->item->getTitle())); ?>');" title="Share and bookmark">
						<img src="images/addthis.gif" width="16" height="16" border="0" alt="" class="addthis"/>
					</a>
                                       </action>
					<!-- AddThis Button END -->
				
				</div>
				
				<?= $this->partial("timeline.phtml", $this->item->getPrefix(), array('item' => $this->item, 'model' => $this->model, 'summary' => $this->summary)); ?>

					<?php if ($this->item->getTagCount() > 0) : 
								$tags = $this->item->getTags();
	
								$strings = array();
								foreach($tags as $tag) {
									$strings[] = "<a href='tag/" . urlencode($tag['symbol']) . "' rel=\"tag\">{$tag['tag']}</a>";
								}
					?>
						<div class="tags footnote">	
							Tags: <?= implode(", ", $strings); ?>
						</div>
					<?php endif ?>
					
			</div>
		</div>
	</div>
</div>
